package org.alex.samples.model;

import java.io.Serializable;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;







@Entity
@Table(name = "exam_subject")
public class Subject implements Serializable{
	/**

	 * 

	 */
	private static final long serialVersionUID = 5461982760987363810L;
	@Id
	@GeneratedValue
	@Column(name = "sub_id",nullable = false,length = 255)
	private Integer id;
	
	@Column(name = "name",nullable = false,length = 255)
	private String name;
	
	@Column(name = "description",nullable = false,length = 255)
	private String description;
	
	@Column(name = "test_count",nullable = false,length = 255)
	private Integer count;
	
	@Column(name = "total_time",nullable = false,length = 255)
	private Integer time;
	
	@Column(name = "total_score",nullable = false,length = 255)
	private Integer score;
	
	@Column(name = "status",nullable = false,length = 1)
	private boolean status;
	
	@OneToMany(mappedBy = "subject")
	private Set<ExamUserSubject> examUserSubject;
	
	public Subject(){
		super();
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public Integer getCount() {
		return count;
	}

	public void setCount(Integer count) {
		this.count = count;
	}

	public Integer getTime() {
		return time;
	}

	public void setTime(Integer time) {
		this.time = time;
	}

	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}

	

	public boolean isStatus() {
		return status;
	}

	public void setStatus(boolean status) {
		this.status = status;
	}

	public Set<ExamUserSubject> getExamUserSubject() {
		return examUserSubject;
	}

	public void setExamUserSubject(Set<ExamUserSubject> examUserSubject) {
		this.examUserSubject = examUserSubject;
	}

	public static long getSerialversionuid() {
		return serialVersionUID;
	}
	
	
}
